import { BaseViewCmp } from "./BaseViewCmp";
import UI_cmp_camera from "../../../ui/Main/UI_cmp_camera";
import { Data_Camera } from "../../debug_inject/common/Data_Camera";
import { EObjCmpType } from "../../debug_inject/common/EObjCmpType";
import { BaseCmpData } from "../../debug_inject/common/BaseCmpData";

export class CmpCamera extends BaseViewCmp {

    public ui: UI_cmp_camera;

    private _cacheData: Data_Camera;

    constructor(objId: number) {
        super(EObjCmpType.Camera, objId);
        this.ui = UI_cmp_camera.createInstance();

        this.ui.m_cmp_clearflag.m_view_dropdown.items = ['SkyBox', 'Soild Color', 'DepthOnly', 'Don\'t Clear'];
        this.ui.m_cmp_clearflag.m_view_dropdown.values = ['SkyBox', 'Soild Color', 'DepthOnly', 'Don\'t Clear'];
        this.ui.m_cmp_clearflag.m_view_dropdown.selectedIndex = 1;
    }

    _OnDispose() {

    }

    _OnRefresh(data: BaseCmpData) {
        if (this._cacheData != null) {
            // 处理更新
        } else {
            // 处理新数据
        }
    }

    private _RefreshUI() {

    }

}